package com.group.Controller;

import com.group.Enity.PropertyType;
import com.group.Service.PropertyTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("propertyType")
public class PropertyTypeController {

    @Autowired
    private PropertyTypeService propertyTypeService;

    @ResponseBody
    @RequestMapping("queryAll")
    public List<PropertyType> queryAll(){
        List<PropertyType> list = propertyTypeService.getTypes();
        return list;
    }
}
